﻿// Services/NotificationService.cs
using MyDapperApi.Services;
using MyDapperApi.Services.QywxDocument.DigitalizationDemand;
using System.Threading.Tasks;

public class QywxUpdateDocDigService
{
    private readonly IAutoNetUpdateService _autoNetUpdateService;
    private readonly IDocDigitalizationDemandService _docDigitalizationDemandService;

    // 通过依赖注入获取配置，从而读取连接字符串
    public QywxUpdateDocDigService(IAutoNetUpdateService autoNetUpdateService,
        IDocDigitalizationDemandService docDigitalizationDemandService)
    {
        _autoNetUpdateService = autoNetUpdateService;
        _docDigitalizationDemandService = docDigitalizationDemandService;
    }
    public async Task ISendPendingNotifications()
    {
        await _autoNetUpdateService.AutoUpdateQywxByRole();
    }

    public async Task IClearDocDigitalizationDemandService()
    {
        await _docDigitalizationDemandService.ClearDataBaseDigitalizationDemand();
    }
}